{% extends "base.html" %}

{% set page_title = 'Topics' %}

{% block javascript_includes %}
    {{ super() }}
    <script type="text/javascript" src="/js/drop_down.js"></script>
{% endblock %}

{% block body %}
    <h1>OWASP ESAPI on Python SwingSet</h1>

    {# MACRO FOR IMPORTED TOPIC NAV VARS #}
    {% macro topic_nav(topic_name, topic_url, subpages) -%}
    <li><a href="{{ topic_url }}">{{ topic_name }}</a>
      <ul>
      {% for pair in subpages %}
      <li><a href="{{ pair[0] }}">{{ pair[1] }}</a></li>
      {% endfor %}
      </ul>
    </li>
    {%- endmacro %}

    <ul id="main_page_nav">
    <li>Cross-Site Scripting
      <ul>
      {% from "xss/nav.html" import topic_name, topic_url, subpages with context %}
      {{ topic_nav(topic_name, topic_url, subpages) }}
      </ul>
    </li>

    <li>Input Validation, Encoding, and Injection
      <ul>
      <li><a class="todo" href="#">To Do</a></li>
      </ul>
    </li>

    <li>Authentication and Session Management
      <ul>
      <li><a class="todo" href="#">To Do</a></li>
      </ul>
    </li>

    <li>Access Control and Referencing Objects
      <ul>
      {% from "object_reference/nav.html" import topic_name, topic_url, subpages with context %}
      {{ topic_nav(topic_name, topic_url, subpages) }}
      </ul>
    </li>

    <li>Encryption, Randomness, and Integrity
      <ul>
      <li><a class="todo" href="#">To Do</a></li>
      </ul>
    </li>

    <li>Caching
      <ul>
      <li><a class="todo" href="#">To Do</a></li>
      </ul>
    </li>

    </ul>
{% endblock body %}
